package com.demo.entity.from;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.demo.entity.DischargeSummaryMedicine;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
public class DischargeSummaryFrom implements Serializable{
    @ApiModelProperty(value = "总结编号")
    @TableId(value = "discharge_summary_id", type = IdType.AUTO)
    private Integer dischargeSummaryId;

    @ApiModelProperty(value = "病患序列号")
    @TableField("patient_id")
    @NotNull(message = "病患序列号不能为空")
    private Integer patientId;

    @ApiModelProperty(value = "出院时间")
    @TableField(value = "discharge_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dischargeTime;

    @ApiModelProperty(value = "出院转归1、医嘱出院2、非医嘱出院3、死亡5、其他")
    @TableField("discharge_whereabouts")
    @NotNull(message = "出院转归不能为空")
    private Integer dischargeWhereabouts;

    @ApiModelProperty(value = "是否非预期死亡 1.是  2.否")
    @TableField("is_expected_death")
    @NotNull(message = "是否非预期死亡不能为空")
    private Integer isExpectedDeath;

    @ApiModelProperty(value = "是否肺血栓栓塞症 1.是 2.否")
    @TableField("is_pte")
    @NotNull(message = "是否肺血栓栓塞症不能为空")
    private Integer isPte;

    @ApiModelProperty(value = "是否间歇充气加压泵(IPC) 1.是 2.否")
    @TableField("is_ipc")
    @NotNull(message = "是否间歇充气加压泵不能为空")
    private Integer isIpc;

    @ApiModelProperty(value = "是否梯度加压弹力袜(GCS) 1.是 2.否")
    @TableField("is_gcs")
    @NotNull(message = "是否梯度加压弹力袜不能为空")
    private Integer isGcs;

    @ApiModelProperty(value = "其他嘱托")
    @TableField("other_entrust")
    @NotBlank(message = "其他嘱托不能为空")
    private String otherEntrust;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time",fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID号")
    @TableField("created_user_id")
    @NotNull(message = "创建人ID号不能为空")
    private Integer createdUserId;

    @ApiModelProperty(value = "签字时间")
    @TableField("sign_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date signTime;

    @ApiModelProperty(value = "签字ID号")
    @TableField("sign_user_id")
    private Integer signUserId;

    @ApiModelProperty(value = "更新人ID号")
    @TableField("updated_user_id")
    private Integer updatedUserId;

    //药物
    private List<DischargeSummaryMedicine> medicines;

}
